This application is based upon and claims the benefit of priority from the prior Japanese Patent Application No. 11-038525, filed Feb. 17, 1999, the entire contents of which are incorporated herein by reference.
This invention relates to a data reading apparatus adapted to scan and read data such as sound data, image data or text data recorded in the form of optically readable dot codes on a recording medium such as paper.
To date, various devices are known for scanning and reading data such as sound data, image data or text data recorded in the form of optically readable dot codes on a recording medium such as paper.
Of the known data reading apparatus of the type under consideration, those disclosed in U.S. Pat. Nos. 5,896,403 and 5,866,895 are manually operable apparatuses that can read a large volume of data recorded in the form of dot codes on a recording medium such as paper. They represent an innovative technology that could not have been achieved hitherto by means of one-dimensional or two-dimensional bar codes and are feasibly used for recording audio data on a recording medium such as paper and for reproducing audio data from such a recording medium.
According to the U.S. Pat. Nos. 5,896,403 and 5,866,895, a dot code 100 to be used with such an apparatus is basically formed by a plurality of blocks 101 that are arranged two-dimensionally side by side as shown in FIG. 1 of the accompanying drawings. Each of the blocks includes: a data dot region which is a region where the data to be recorded of the block obtained by dividing the original data concerning a piece of information in the form of sound, image or text is arranged as a dot image (hereinafter referred to as data dot 102) formed by white dots or black dots representing respective bit values of xe2x80x9c0s xe2x80x9d or xe2x80x9c1sxe2x80x9d and arranged according to a predetermined format; a plurality of pattern dots 103 arranged to show a predetermined positional relationship relative to the data dot region in order to provide reference points for reading the data dots 102; markers 104 arranged at the four corners of the block, each containing a predetermined number of black dots arranged continuously in succession; and a block address pattern 105 containing a block address and an error detection or error correction sign and arranged along a boundary line separating the block and an adjacently located block so that a plurality of different blocks may be identified when they are read.
With such a dot code 100, if the dot code extends beyond the field of view of the data reading apparatus or the area that can be picked up by the data reading apparatus with a single shot, the entire original data can be reconstructed from the data contained in the blocks so long all the data dots 102 of each and every one of the blocks 101 are picked up somehow along with the block address (block address pattern 105) assigned to the block 101 so that a large volume of data may be recorded on and retrieved from a sheet of paper.
Now, the configuration of such a data reading apparatus adapted to read a dot code 100 will be described below.
The data reading apparatus at least comprises: an imaging section including a lighting unit typically containing an LED for illuminating a dot code 100, an optical system for forming an image of the dot code 100 from the light reflected by the dot code 100 and a solid image pickup element such as CCD for picking up the image formed by the optical system; an image data storage section for converting the signal output from the imaging section for the picked up image into binary data and storing the obtained binary data as image data; a marker detecting section for detecting the markers from the image data stored in the image data storage section; a read reference points determining section for determining read reference points to be used for reading the data dots 102; a data dot reading section for reading the data dots 102 by referring to the determined read reference points; and a reproduction/output section for reproducing and outputting the restored original data that may be voiced information.
If the markers have the largest diameter equal to the length of five data dots 102 that are arranged linearly and continuously arranged side by side, the number of consecutively arranged data dots 102 is limited (modulated) to less than five. Thus, the marker detecting section detects the markers from the. image data storage section by utilizing this fact and discriminating markers 104 and data dots 102 on the basis of the above threshold.
The read reference points determining section determines a plurality of pattern dot reading points from positions of two adjacently located markers 104 detected by the marker detecting section and related known information (format information) and detects each of the pattern dots 103 by referring to the determined plurality of pattern dot reading points. Then, it computationally determines the read reference point (corresponding to the real center of the marker 104) by minimizing the value of the error function determined on the basis of the distance from each of the pattern dot reading points and the center of each of the actually detected pattern dots 103. The data dot reading section divides the gap between any two markers that are located at four corners of each block with lines that are spaced apart by a predetermined distance and reads the pixel value of each of the crossings of the vertical lines and the horizontal lines, or the lattice points, to see if it is black or white.
For the marker detecting section to discriminate markers 104 from data dots 102 and detect the former, it has to use certain parameters including, for instance, a threshold value for the length of a black run that is used for detecting markers 104. If the threshold value is not set appropriately, the marker detecting section may not be able to detect markers 104 or may mistake data dots 102 for markers 104 to consequently detect may wrong markers. The set of the threshold value is particularly important when the data reading apparatus is designed to read dot codes 1 containing data dots 102 having different sizes.
This will be discussed further by referring to FIGS. 2A and 2B.
Referring firstly to FIG. 2A, assume here that each data dot 102 has a diameter equal to xe2x80x9c1xe2x80x9d and data dots 102 are so modulated that there will be no consecutively arranged four dots, whereas each marker 104 has a diameter of xe2x80x9c5xe2x80x9d. Since data dots 102 are arranged according to the output of the data to be recorded, there may be three consecutively arranged data dots 102 as shown in FIG. 2A. When detecting markers 104 from an image containing both data dots 102 and markers 104 on the basis of the lengths of black runs, only the black runs of the markers 104 can be detected efficiently without erroneously detecting consecutively arranged data dots 102 by setting xe2x80x9c4xe2x80x9d for the threshold value for the length of a black run for detecting markers 104. On the other hand, three consecutively arranged data dots 102 in the image will be detected as candidates for markers if xe2x80x9c3xe2x80x9d is set for the threshold value for the length of a black run for detecting markers 104 so that a long and tedious process may have to be followed to finally detect correct markers. Meanwhile, it will be appreciated that no markers will be detected if a too large value is set for the threshold value. there may be three consecutively arranged data dots 102 as shown in FIG. 2A. When detecting markers 104 from an image containing both data dots 102 and markers 104 on the basis of the lengths of black runs, only the black runs of the markers 104 can be detected efficiently without erroneously detecting consecutively arranged data dots 102 by setting xe2x80x9c4xe2x80x9d for the threshold value for the length of a black run for detecting markers 104. On the other hand, three consecutively arranged data dots 102 in the image will be detected as candidates for markers if xe2x80x9c13xe2x80x9d is set for the threshold value for the length of a black run for detecting markers 104 so that a long and tedious process may have to be followed to finally detect correct markers. Meanwhile, it will be appreciated that no markers will be detected if a too large value is set for the threshold value.
Thus, data dots 102 will not be mistaken for markers 104 in the image of FIG. 2A when xe2x80x9c4xe2x80x9d is set as for the threshold value for the length of a black run as parameter for detecting markers 104.
However, if the same data reading apparatus is used for reading a dot code having an image as shown in FIG. 2B where both the size of each data dot 102 and that of each marker 104 are doubled from those of the dot code of FIG. 2A and still the threshold value of xe2x80x9c4xe2x80x9d is used for the length of a black run as parameter for detecting markers, then black runs not smaller than xe2x80x9c4xe2x80x9d will be found not only in makers 104 but also in many consecutive data dots 102 and the latter will be mistaken for so many markers so that it is not longer possible to carry out a correct marker detecting operation. It will be appreciated that the optimal value for the length of a black run for detecting markers 104 in the dot code of FIG. 2B is xe2x80x9c8xe2x80x9d.
Thus, when a same data reading apparatus is used for reading dot codes having respective sizes that are different from each other, the threshold value for detecting markers will have to be set appropriately depending on the application for which it is used.
U.S. Pat. No. 5,898,166 proposes a data reading apparatus adapted to this problem.
A data reading apparatus according to the above identified U.S. Patent is adapted to read dot codes having respective sizes that are different from each other by detecting markers with initial parameters and setting parameters for another time on the basis of the number of the detected markers. If the number of the detected markers exceeds a predetermined number, the apparatus decides that it has mistaken data dots for markers because the set threshold value is too small and sets a larger threshold value. If, on the other hand, no marker is detected, the apparatus decides that the set threshold value is too large and sets a smaller threshold value to detect markers once again.
Thus, with the above data reading apparatus, the threshold value for detecting markers is set appropriately depending on the application for which it is used so that it can correctly detect markers from data codes having respective sizes that are different from each other. In other words, a single data reading apparatus can be used to read different dot codes having respective sizes that are different from each other.
However, the above cited patent document of U.S. Pat. No. 5,898,166 does not discuss how the initial parameters are set appropriately when the size of the dot code to be read for the first time by the data reading apparatus is not known.
In other words, the data reading apparatus may not be able to detect markers 104 properly or mistake data dots 102 for markers to erroneously detect many wrong markers in the initial stages of operation of the apparatus.
If many wrong markers are erroneously detected, a long and tedious process will have to be followed until only the right markers 104 are detected. This means that the operation of reading the data dots on a real time basis within a processing unit period of a frame of image of a dot code in the imaging section cannot be carried out and hence the data read out by the apparatus may be deficient.
In view of the above identified problem of the prior art, it is therefore the object of the present invention to provide a data reading apparatus that is adapted to reliably reduce the risk of detecting many wrong markers in the initial stages of operation of reading dot codes of the apparatus and set initial parameters appropriately according to the application for which it is used in order to read dot codes having respective sizes that are different from each other.
According to an aspect of the present invention, there is provided a data reading apparatus comprising:
an imaging section for picking up an image of an optically readable dot code containing a plurality of data dots arranged according to the data to be recorded and markers providing data dot read reference points for reading the data dots and showing a predetermined relationship relative to the data dots in terms of a predetermined physical characteristic quantity, the data dots and the markers being arranged to show a predetermined positional relationship;
an image data storage section for storing the image data of the dot code picked up by the imaging section;
a parameter setting section for setting parameters to be used for detecting markers on the basis of the relationship between the data dots and the markers in terms of the predetermined physical characteristic quantity;
a marker detecting section for detecting markers from the image data stored in the image data storage section on the basis of the parameters set by the parameter setting section;
a data dot read reference points determining section for determining the data dot read reference points for reading the data dots of the dot code on the basis of the markers detected by the marker detecting section; and
a data dot reading section for reading the data dots by referring to the data dot read reference points determined by the data dot read reference points determining section, wherein
the parameter setting section being adapted to determine parameters suitable for detecting markers firstly without detecting data dots from the image data of the dot code stored in the image data storage section on the basis of the relative relationship between the data dots and the markers in terms of the physical characteristic quantity.
Additional objects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objects and advantages of the invention may be realized and obtained by means of the instrumentalities and combinations particularly pointed out hereinafter.